package com.im.entity;


import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.util.Date;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author xainsir
 * @since 2025-02-14
 */
@Data
@TableName("im_group_message")
@Schema
public class ImGroupMessage implements Serializable {
    private static final long serialVersionUID=1L;

    //雪花ID
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @TableField("message_id")
    @Schema(description = "会话级别递增消息ID")
    private String messageId;

    @TableField("sender_id")
    @Schema(description = "发送者ID")
    private Integer senderId;

    @TableField("group_id")
    @Schema(description = "群聊ID")
    private Integer groupId;

    @TableField("session_id")
    @Schema(description = "会话ID")
    private Long sessionId;

    @TableField("message_type")
    @Schema(description = "消息类型")
    private Integer messageType;

    @TableField("content")
    @Schema(description = "消息内容")
    private String content;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "消息发送时间")
    private LocalDateTime createTime; // 自动填充

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "消息更新时间")
    private LocalDateTime updateTime; // 自动填充
}
